<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .error{
            color: red;
        }
    </style>
</head>
<body>
    {{-- 错误信息分字段显示 --}}
    <form action="" method="post">
        @csrf
        <p>
            <label for="">用户名称
                <input type="text" name="username" value="{{ old('username') }}">
            </label>
            @if ($errors->has('username'))
                <span class="error">{{ $errors->first('username') }}</span>
            @endif
        </p>
        <p>
            <label for="">密码
                <input type="password" name="password" id="">
            </label>
            @if ($errors->has('password'))
                <span class="error">{{ $errors->first('password') }}</span>
            @endif
        </p>
        <p>
            <label for="">确认密码
                <input type="password" name="password_confirmation" id="">
            </label>
            @if ($errors->has('password_confirmation'))
                <span class="error">{{ $errors->first('password_confirmation') }}</span>
            @endif
        </p>
        <p>
            <label for="">邮箱
                <input type="text" name="email" id="">
            </label>
            @if ($errors->has('email'))
                <span class="error">{{ $errors->first('email') }}</span>
            @endif
        </p>
        <p>
            <label for="">QQ
                <input type="text" name="qq" id="">
            </label>
            @if ($errors->has('qq'))
                <span class="error">{{ $errors->first('qq') }}</span>
            @endif
        </p>
        <p>
            <input type="submit" value="用户注册">
        </p>
    </form>
</body>
</html>